package com.learn.spring.java_config;

import com.learn.spring.bean.Dog;
import com.learn.spring.bean.IAnimal;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 注释方式配置Spring
 */
@Configuration
public class AppConfig {
    @Bean(name = "animal")
    public IAnimal getAnimal() {
        return new Dog();
    }
}
